#include <iostream>
#include <vector>
using namespace  std;
class Solution {
public:
	int findMaxConsecutiveOnes(vector<int>& nums) {
		int maxLength =0;
		int length = 0;
		for(auto&i:nums)
		{
			if(i!=1)
			{
				maxLength = length > maxLength ? length : maxLength;
				length = 0;
			}
			else
			{
				if (length == 0)
					length = 1;
				else 
					length++;
			}
		}
		maxLength = length > maxLength ? length : maxLength;
		return maxLength;
	}
};
int main()
{
	
}